import React from 'react'

export default class ContainerViewExtend extends React.Component{

    render(){
        const {data,tabId} = this.props
        const {items}  = data
        let content = null
        let item
        if(items.length > 0 && items.find((element)=>(element.id == tabId))){
            item = items.find((element)=>(element.id == tabId))
            content = (
                <iframe id={`custom-page-frame-${data.id}`} name={`custom-page-frame-${data.id}`} src={item.setting.url} width="100%" height="100%" frameBorder="0" style={{'flex':'1'}}>
                </iframe>
            )
        }

        return (
            <div style={{height:'100%','display':'flex','flex-flow':'column'}}>
                {content}
            </div>
        )
    }
}